import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JPanel;

import org.w3c.dom.css.RGBColor;


public class PanneauCoupe extends JPanel{
	
	public JFrame myFen;
	public int posX=20;
	public int posY=40;
	public int posYpred;
	public boolean depart;
	public Image img;

		public PanneauCoupe(JFrame fen){
			try {
				img = ImageIO.read(new File("ressources/coupeCartes.jpg"));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	
	 public void paintComponent(Graphics g){

		 int i=0;		
		if(posY%50==0) g.drawImage(this.img, 0, 0, this);
		 g.setColor(new Color(97,156,92));
		 g.fillRect(25,posYpred,25,2);

         g.setColor(Color.black);
         g.fillRect(25,posY,25,2);
         
         posYpred=posY;


	 	}
}
